package cn.net.shuxing.yifu.common.dto;

import lombok.Data;

import java.time.LocalDateTime;

@Data
public class DateTimeVo {

    private int year;
    private int month;
    private int day;
    private int hour;
    private int minute;
    private int second;
    private int weekday;

    public DateTimeVo(LocalDateTime localDateTime)
    {
        year = localDateTime.getYear();
        month = localDateTime.getMonthValue();
        day = localDateTime.getDayOfMonth();
        hour = localDateTime.getHour();
        minute = localDateTime.getMinute();
        second = localDateTime.getSecond();
        weekday = localDateTime.getDayOfWeek().getValue();
    }
}
